package cn.community.system.service;

import cn.community.system.domain.Association;
import cn.community.system.domain.Member;
import cn.community.system.query.AssociationQuery;
import cn.community.system.query.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface IAssociationService {
    void delete(Long id);
    void save(Association association);
    Association get(Long id);
    List<Association> listAll();
    void update(Association association);

    // 分页
    PageInfo query(QueryObject qo);

    PageInfo queryMyAssos(AssociationQuery qo);

    PageInfo listAsso(AssociationQuery qo);

    void save2(Association association);

    /**
     * 检查手机号是否存在
     * @param phone
     * @return true 存在 false 不存在
     */
    boolean checkPhone(String phone);
    // 注册

    void regist(Association association,String rpassword);
    // 登录

    Association userLogin(String username,String password);

    void batchDelete(Long[] ids);

    Long findIdByName(String association);

    void passOne(Long id, Integer isAgree);

    Association getAssociationByUsername(String username);
    // 导入

    void importXls(MultipartFile file) throws Exception;
    // 导出

    Workbook exportXls();

    PageInfo getFounderByDutyId(QueryObject qo);

    void myUpdate(Association association);

    void updateActivityNumberAndDay(Association association);
}
